package recognition.hand;

import java.util.ArrayList;

import android.graphics.Bitmap;

public class SurfTemplates {
	// private members
	private static SurfTemplates _instance;
	ArrayList<Surf> _templateData;
	
	// public accessor
	public static SurfTemplates Instance(){
		if(_instance==null){
			_instance = new SurfTemplates();
		}
		return _instance;
	}
	
	public void AddTemplate(Bitmap input){
		Surf newSurf = new Surf(input);
		_templateData.add(newSurf);
	}
	
	public Surf GetTemplate(int i){
		if(i>=_templateData.size())
			return null;
		return _templateData.get(i);
	}
	
	public int GetTemplateSize(){
		return _templateData.size();
	}
	
	// private constructor
	private SurfTemplates(){
		_templateData = new ArrayList<Surf>();
		_templateData.clear();
	}
}
